# -*- coding: UTF-8 -*-
"""
Create by Louis on 2020/6/20-22:14
"""
# __author__ = "Louis"

# 使用while循环实现输出2-3+4-5+6…+100 的和

n = 2
count = 0
while n <= 100:
    if n % 2 == 0:
        count += n
    else:
        count -= n
    n = n + 1
print(count)
print()
# count = 0
# number = 2
# while number <= 100:
#     if number % 2 == 0:
#         count += number
#     else:
#         count -= number
#     number += 1
# if number == 101:
#     print(count)